import req from '@/http/http'
import {getServer} from '@/http/AppApi'

let ZHPQ_SERVER = getServer()

// 护路护线
// 修改
export const updateRoad = data => {
  let path = ZHPQ_SERVER + '/road/' + data.id
  return req.put(path, data)
}
// 删除
export const delRoad = data => {
  let path = ZHPQ_SERVER + '/road/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getRoad = param => {
  let path = ZHPQ_SERVER + '/road'
  return req.get(path, param)
}
// 新增
export const createRoad = data => {
  let path = ZHPQ_SERVER + '/road/'
  return req.post(path, data)
}

// 涉及线路案件
// 修改
export const updateRoadCase = data => {
  let path = ZHPQ_SERVER + '/roadCase/' + data.id
  return req.put(path, data)
}
// 删除
export const delRoadCase = data => {
  let path = ZHPQ_SERVER + '/roadCase/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getRoadCase = param => {
  let path = ZHPQ_SERVER + '/roadCase'
  return req.get(path, param)
}
// 新增
export const createRoadCase = data => {
  let path = ZHPQ_SERVER + '/roadCase/'
  return req.post(path, data)
}
